Skip to content

fill: the build's summary line and the notice read the graphs, never re-apply the links - #2032

Open
swapnilpaliwal-sd wants to merge 1 commit into
devfrom
fix/link-changed-windows
Open

swapnilpaliwal-sd wants to merge 1 commit into
devfrom
fix/link-changed-windows

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

The nightly on dev failed on Nov 20 and 21 with one check of 1,941, on Windows only:

FAIL python/asserted-links: the linked line itself edited: the list says so at once, before any rebuild
     missing/unwanted: [changed] app/dispatch.py:6:12 (now line 8)  → on_save
         2. [stale] app/dispatch.py:6:12  → on_save  — stale: the line was edited (...)

Cause

A query waiting for a rebuild (path --fresh) returns once the new graph is published. The build then still runs its
summary line, ax_fill.py --summary (added in #2028), which called ax_links.sync. The new graph was not yet stamped
with the links file, so sync re-applied the links against the working tree as it was at that moment. When the case
edited the linked line in that window, the link was written into the graph as [stale] instead of being listed as
[changed].

A trace on a Windows runner (every apply_repo and refresher start, with each step's time) under the nightly's load
(--jobs 4) shows it:

time event
210.417 step 24 (link): step 23's --fresh query has returned
210.526 apply_repo, called by ax_fill.py --summary from the build still finishing
210.589 step 25: edit + link

There the re-apply came 63 ms before the edit, so the run passed. On the nightly it came after the edit. A quiet runner
passes 3/3, so it never shows on a pull request.

Fix

worklist(sync=False) for the build's summary line and the once-per-build notice (hooks, MCP): they count, they write
nothing. The unresolved listing is a query and still re-applies a links file the graphs were not given, as every
query does.

Tests

  • tests/fill.py (+4 checks, 32/32): a published but unstamped graph, the linked line edited, the summary and the
    notice run.
    • The link is still [changed], and no graph was re-stamped. Both checks fail on dev with the nightly's [stale]
      line.
    • Control: unresolved re-stamps every graph.
  • tests/run.py asserted-links, -anonymous, -derive (all languages): 168/168. mcp, mcp_first, hooks_from_path,
    hosts, front_door: pass.
  • surfaces (README --fresh) and freshness (prune on a case-insensitive disk) fail the same way on dev
    unchanged.

…re-apply the links

A query waiting for a rebuild returns once the new graph is published. The build then still runs its summary line
(`ax_fill.py --summary`), which called `ax_links.sync`: the new graph was not yet stamped with the links file, so
the links were re-applied against the working tree as it was at that moment. A linked line edited in that window was
written into the graph as [stale], where `axiomcode link` should say [changed] (edited since the build). On the
nightly's Windows runner, under four cases at a time, that window held the edit in python/asserted-links two nights
running.

`worklist(sync=False)` for the summary line and the once-per-build notice: they count and write nothing. The
`unresolved` listing is a query and still re-applies a links file the graphs were not given.

tests/fill.py: a published but unstamped graph, the linked line edited, the summary and the notice run: the link is
still [changed] and no graph was re-stamped (both fail before this change, with the nightly's [stale] line); the
control, `unresolved`, re-stamps them.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd swapnilpaliwal-sd added bug Something isn't working plugin the axiomcode plugin: skill + MCP layer labels Nov 21, 2026
@swapnilpaliwal-sd swapnilpaliwal-sd self-assigned this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working plugin the axiomcode plugin: skill + MCP layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant